package com.mentaleye.dal.dao;

import java.util.List;
import java.util.Map;

import com.mentaleye.dal.model.OaClassRelation;
import com.mentaleye.dal.model.OaClassRelationExample;
import com.mentaleye.dal.model.OaClassRelationKey;

public interface OaClassRelationDao {

	/**
	 * 班级添加关联
	 * @param oaClassRelation 传入关联类对象
	 * @return 返回是否添加成功 true为成功 false为失败
	 */
	public boolean addOaClassRelation(OaClassRelation oaClassRelation);
	
	public boolean addOaClassRelationList(List<OaClassRelation> list);
	/**
	 * 修改班级关联
	 * @param oaClassRelation 传入要修改的关联ID及修改的内容
	 * @return 返回是否成功 true为成功 false为失败
	 */
	public boolean updateOaClassRelation(OaClassRelation oaClassRelation);
	
	public boolean updateOaClassRelationList(Map<String, Object> map);
	
	boolean updateOaClassRelationByExampleSelective(OaClassRelation record,OaClassRelationExample example);
	
	/**
	 * 删除当前关联
	 * @param key 传入要删除的关联的主键
	 * @return 返回是否删除成功 true为成功 false为失败
	 */
	public boolean deleteOaClassRelation(OaClassRelationKey key);

	/**
	 * 根据关联班级或人员查询相应的关联信息
	 * @param key 关联表中的主键
	 * @return 如果传入的主键对象中只有一个主键有值，那么查询到的就是这个主键对应的关联集合，
	 * 			如果是俩个主键都有值那么查询到的就是对应的一条数据
	 */
	public List<OaClassRelation> queryOaClassRelationById(List<Integer> ids);
	
	public List<OaClassRelation> queryOaClassRelationByPersonId(List<Integer> ids);
	
	/**
	 * 根据主键查询班级
	 * @param key 主键实体类对象
	 * @return 返回i一个班级对象
	 */
	public OaClassRelation queryOaClassRelationByKey(OaClassRelationKey key);

	public List<OaClassRelation> queryOaClassRelationByIdAndPersonType(OaClassRelation oaClassRelation);
	
	public OaClassRelation selectClassIdByPersonId(int personId);
	
	public List<Map<String, Object>> queryClassCountByPerson(OaClassRelation oaClassRelation);
	
	public  List<OaClassRelation> queryOaclassRelation(OaClassRelationExample example);
	
	public List<OaClassRelation> queryStudentByClassId(Integer oaclassId);

	public List<Map<String, Object>> selectNotClassStudent();
	
	boolean deleteByExample(OaClassRelationExample example);
	
	List<Map<String,Object>> getListByMap(Map<String, Object> map);
}
